package wiBase;

import wiBase.baseInterface.OnOutputStreamListener;

/**
 * class parent of all network-simulation-object
 */
public class WiObject {
    
    private String _uniqueId = "";
    /**
     * listener for output console.
     */
    private OnOutputStreamListener _outputListener = null;
    private boolean _changeable = true;

    public WiObject() {
    }

    public WiObject(String unique) {
	this._uniqueId = unique;
    }
    /**
     * @param listener: callback for console
     */
    public void setOutputListener(OnOutputStreamListener listener) {
	this._outputListener = listener;
    }
    /**
     * @return listener for output console
     */
    public OnOutputStreamListener getOutputListener() {
	return _outputListener;
    }

    public void setChageable(boolean changeable) {
	this._changeable = changeable;
    }

    public boolean isChangeable() {
	return this._changeable;
    }

    public String getUnique() {
	return _uniqueId;
    }

    protected void setUnique(String unique) {
	this._uniqueId = unique;
    }
    /**
     * called when this object is set trace.
     * @see setTraceObject(int idObject);
     * @throws WiException
     */
    public void run(String type, WiObject... seriable) throws WiException {
    }
}
